<div class="row-fluid" id="controller-Restrict">
    <div class="span10">
        <h3 class="subsection">Restrict</h3>

        <p>Restrict requires users to have roles that match the ones defined in the constraint, in any combinaton of AND/OR/NOT</p>

        <p>Restrict uses an ANDed set of roles to determine access to an action - these are defined as as Array[String[.  For example, a
            user with the roles "foo" and "bar" could access a Restrictions-protected action that specified any of the
            following:</p>
        <ul>
            <li>foo</li>
            <li>bar</li>
            <li>foo AND bar</li>
        </ul>

        <p>However, a Restrict that required "foo", "bar" and "hurdy" would deny access to the user.</p>
        <p>To define OR relationships, multiple groups within a list, i.e. List[Array[String]]</p>
    </div>
</div>
<div class="row-fluid">
    <div class="span5 columnHeader">Specification</div>
    <div class="span5 columnHeader">Result</div>
</div>
<div class="row-fluid">
    <div class="span5">
                    <pre>
Restrict(Array("foo")) {
  Action {
    Ok(accessOk())
  }
}</pre>
    </div>
    <div class="span5">
        <iframe src="@routes.RestrictController.restrictOne"></iframe>
    </div>
</div>
<div class="row-fluid">
    <div class="span5">
                    <pre>
Restrictions(Array("foo", "bar")) {
  Action {
    Ok(accessOk())
  }
}</pre>
    </div>
    <div class="span5">
        <iframe src="@routes.RestrictController.restrictTwo"></iframe>
    </div>
</div>
<div class="row-fluid">
    <div class="span5">
                    <pre>
Restrictions(Array("foo", "!bar")) {
  Action {
    Ok(accessOk())
  }
}</pre>
    </div>
    <div class="span5">
        <iframe src="@routes.RestrictController.restrictThree"></iframe>
    </div>
</div>
<div class="row-fluid">
    <div class="span5">
                    <pre>
Restrictions(Array("hurdy")) {
  Action {
    Ok(accessOk())
  }
}</pre>
    </div>
    <div class="span5">
        <iframe src="@routes.RestrictController.restrictFour"></iframe>
    </div>
</div>